package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.PermissionDao;
import com.itheima.pojo.Permission;
import com.itheima.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    private PermissionDao permissionDao;

    @Override
    public List<Permission> findall() {
        List<Permission> findall = permissionDao.findall();
        return findall;
    }

    @Override
    public List<Integer> findPermissionsByRoleID(int id) {
        List<Integer> permissionsByRoleIDs = permissionDao.findPermissionsByRoleID(id);
        return permissionsByRoleIDs;
    }
}
